/**
 * Copyright (c) 2017 Guangzhou Ourchem Infomation Consulting Co., Ltd.
 */
package com.eddy.liveline.core.spring.mybatis.pagehelper;

import com.github.pagehelper.PageInfo;

import java.util.List;

/**
 * Function: 用户分页 结果. <br/>
 *
 * @author duan cunzhen
 * @date 2017年6月27日 上午10:09:57
 */
public class Table<T> extends PageInfo<T> {

	/**
	 * total : 查询结果总数
	 */
	private long total;

	/**
	 * list : 分页结果集合
	 */
	private List<T> rows;
	

	public Table() {
		super();
	}

	/**
	 * @param total
	 * @param list
	 */
	public Table(Long total, List<T> rows) {
		super();
		this.total = total;
		this.rows = rows;
	}

	/**
	 * @return the total
	 */
	public long getTotal() {
		return total;
	}

	/**
	 * @param total
	 *            the total to set
	 */
	public void setTotal(long total) {
		this.total = total;
	}

	/**
	 * @return the rows
	 */
	public List<T> getRows() {
		return rows;
	}

	/**
	 * @param rows the rows to set
	 */
	public void setRows(List<T> rows) {
		this.rows = rows;
	}

	@Override
	public String toString() {
		return "Table [total=" + total + ", rows=" + rows + "]";
	}
}
